<?php
header("Content-Type:text/json");
$sever='127.0.0.1';
$username = 'root';
$passwords = '';
$databaseName = 'userdate';
$con = new mysqli($sever,$username,$passwords,$databaseName);
$phonenumber = $_GET['phonenumber'];
$password = $_GET['password'];
if($con->connect_error){
	echo ("数据库链接失败".$con->connect_error);
}
$userdate = 'select * from userdate where (phonenumber = "'.$phonenumber.'") and (password = "'.$password.'")';
$resultArr = $con -> query($userdate);
if ($resultArr -> num_rows > 0) {
	$obj = $resultArr->fetch_object();
    echo json_encode(array('code'=>'1','content'=>'登录成功'));
}else if($resultArr->num_rows==0){
    echo json_encode(array('code'=>'0','content'=>'用户名或密码错误'));
}






?>